package com.sgb.goods.view.adapter;

import androidx.databinding.ViewDataBinding;

import com.chad.library.adapter.base.BaseViewHolder;
import com.sgb.goods.BR;
import com.sgb.goods.R;
import com.sgb.goods.entity.MemberPriceEntity;
import com.sgb.goods.utils.base.adapter.BaseCommonAdapter;

public class MemberPriceDetailsAdapter extends BaseCommonAdapter<MemberPriceEntity.MemberPriceSkuDetail> {

    public MemberPriceDetailsAdapter() {
        super(R.layout.goods_item_member_price_details, BR.viewModel);
    }

    @Override
    protected void convert(BaseViewHolder baseHolder, ViewDataBinding dataBinding, MemberPriceEntity.MemberPriceSkuDetail entity) {
        baseHolder.setVisible(R.id.line, baseHolder.getLayoutPosition() != getData().size() - 1);
    }
}
